package io.renren.modules.medical.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 病人信息实体
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-03-23 21:24
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("patient_info")
public class PatientInfoEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.ASSIGN_ID)
    private Long id; // 使用雪花算法防止id冲突，更具识别性

    @TableField("phone")
    private String phone;

    @TableField("name")
    private String name;

    @TableField("description")
    private String description;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @TableField("create_time")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @TableField("update_time")
    private Date updateTime;

    @JsonIgnore
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private Map<String,Object> param = new HashMap<>();


}
